import Vue from 'vue'
import VueRouter from 'vue-router'
import xyBackComment from "@/views/backComment/xyBackComment";
import login from "@/views/login/login";
import home from "@/views/home/home";
import xyComment from "@/views/comment/xyComment";
import xydelivery from "@/views/delivery/xydelivery";
import xytalk from "@/views/talk/xytalk";
import xyuser from "@/views/user/xyuser";
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: home,
    children:[
      {
        path: '/backComment',
        name: 'backComment',
        component: xyBackComment,
      },
      {
        path: '/comment',
        name: 'comment',
        component: xyComment
      },
      {
        path: '/delivery',
        name: 'delivery',
        component: xydelivery
      },
      {
        path: '/talkList',
        name: 'talkList',
        component: xytalk
      },
      {
        path: '/userList',
        name: 'userList',
        component: xyuser
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: login
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
